﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Lyon.Register.WinForm
{
    partial class RegisterInfoForm : Form
    {
        public RegisterInfoForm()
        {
            InitializeComponent();
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.Text = String.Format(this.Text, SimpleRegister.AppName);
            LoadInfo();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            RegisterForm view = new RegisterForm();
            if (view.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                LoadInfo();
            }
        }

        private void LoadInfo()
        {
            textBox3.Text = SimpleRegister.UserName;
            textBox4.Text = SimpleRegister.LimitString;
        }
    }
}
